package tree;

import java.util.Arrays;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        TestBinaryTree tree = new TestBinaryTree();
        TreeNode root = tree.createTree();
        tree.preOrder(root);
        System.out.println("\n===========");
//        tree.middleOrder(root);
//        System.out.println("\n===========");
//        tree.lastOrder(root);
//        System.out.println("\n===========");
//        int res = tree.size(root);
//        System.out.println("节点个数 " + res);
//        int leaf = tree.getLeafNodeSize(root);
//        System.out.println("叶子节点个数为 " + leaf);
//        int nSize = tree.nNodeSize(4,root);
//        System.out.println("第k层节点个数为 " + nSize);
//        int high = tree.getHeight(root);
//        System.out.println("树的高度为 " + high);
//        List<Character> list = tree.preNon_recursion(root);
//        System.out.println(list);
        List<Character> list1 = tree.lateNon_recursion(root);
        System.out.println(list1);
    }
}
